package org.hs.im.forensicj.view.imageviewer.action;

import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;

import javax.swing.KeyStroke;

import org.hs.im.forensicj.Resources;
import org.hs.im.forensicj.view.ImageViewer;

import bibliothek.gui.dock.common.action.CButton;

public class CutButton extends CButton {

	private ImageViewer viewer;

	public CutButton(ImageViewer viewer) {
		this.viewer = viewer;
		setText( "Cut" );
		setIcon( Resources.getIcon( "imageviewer.cut" ) );
		setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_X, InputEvent.CTRL_MASK ) );
	}

	@Override
	protected void action() {
		viewer.cutToClipboard();
	}

}
